﻿@model dziennik_asp_mvc.Models.Entities.Users

@{
    ViewBag.Title = ViewBag.Type;
}

<div class="panel panel-primary">
    <div class="panel-heading">Profil</div>
    <div class="panel-body">
        @using (Html.BeginForm("EditProfile","User",FormMethod.Post))
        {
            @Html.AntiForgeryToken()

            <div class="form-horizontal">
                @Html.ValidationSummary(true)
                @Html.HiddenFor(model=> model.id_user)                
                <div class="form-group">
                    @Html.LabelFor(model => model.first_name, new { @class = "col-lg-2 control-label" })
                    <div class="col-lg-3">
                        <label style="padding-top: 7px;">@Model.first_name</label>
                        @Html.ValidationMessageFor(model => model.first_name)
                    </div>
                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.last_name, new { @class = "col-lg-2 control-label" })
                    <div class="col-lg-3">
                        <label style="padding-top: 7px;">@Model.last_name</label>
                        @Html.ValidationMessageFor(model => model.last_name)
                    </div>
                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.login, new { @style = "float:left;padding-top: 7px;", @class = "col-lg-2 control-label" })
                    <div class="col-lg-3">
                        <label style="padding-top: 7px;">@Model.login</label>                        
                        @Html.ValidationMessageFor(model => model.login)
                    </div>
                </div>
                
                <div class="form-group">
                    @Html.LabelFor(model => model.email, new { @class = "col-lg-2 control-label" })
                    <div class="col-lg-3">
                        <label style="padding-top: 7px;">@Model.email</label>                        
                        @Html.ValidationMessageFor(model => model.email)
                    </div>
                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.Roles.role_name, new { @class = "col-lg-2 control-label" })
                    <div class="col-lg-3">
                        <label style="padding-top: 7px;">@Model.Roles.role_name</label>                        
                        @Html.ValidationMessageFor(model => model.Roles.role_name)
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-lg-offset-2 col-lg-2">
                        <input type="submit" value="Zmień dane" class="btn btn-primary btn-block" />
                    </div>
                </div>
            </div>
        }
    </div>
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
